<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta content="width=device-width, initial-scale=1.0" name="viewport">

    <title><?php echo $ptitle ?></title>
    <meta name="description" content="<?php echo $desc ?>"/>
    <meta name="keywords" content="<?php echo $keyword ?>" />
    <meta name="author" content="<?php echo $author ?>">

    <link rel="shortcut icon" href="<?php echo base_url(); ?>assets/theme/blue/images/favicon.ico"/>    
    <!-- Le styles -->
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/styles.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/bootstrap-select.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/blueimp-gallery.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/jquery.cleditor.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/theme/blue/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&amp;language=en"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/bootstrap.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/gmap3.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/bootstrap-select.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/bootstrap-datetimepicker.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/blueimp-gallery.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/jquery.cleditor.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/jquery.custom.js"></script>
    
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/load-image.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/jquery.helpers.js"></script>
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/jquery-ui-1.10.3.custom.min.js"></script> <!-- jQuery UI -->
    
    <!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/theme/blue/css/jquery.fileupload-ui.css" />
    <!-- CSS adjustments for browsers with JavaScript disabled -->
    <noscript><link rel="stylesheet" href="<?php echo base_url(); ?>assets/theme/blue/css/jquery.fileupload-ui-noscript.css" /></noscript>    
    <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/fileupload/jquery.iframe-transport.js"></script>
    <!-- The basic File Upload plugin -->
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/fileupload/jquery.fileupload.js"></script>
    <!-- The File Upload file processing plugin -->
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/fileupload/jquery.fileupload-fp.js"></script>
    <!-- The File Upload user interface plugin -->
    <script src="<?php echo base_url(); ?>assets/theme/blue/js/fileupload/jquery.fileupload-ui.js"></script>
    <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
    <!--[if gte IE 8]><script src="<?php echo base_url(); ?>assets/theme/blue/js/cors/jquery.xdr-transport.js')?>"></script><![endif]-->
    
    <script language="javascript">
    
        var timerMap;
        var firstSet = false;
        $(document).ready(function()
        {
            /* Search start */
            $('.menu-onmap li a').click(function () { 
              if(!$(this).parent().hasClass('list-property-button'))
              {
                  $(this).parent().parent().find('li').removeClass("active");
                  $(this).parent().addClass("active");
                  return false;
              }
            });
            
            $('#search-start').click(function () { 
              manualSearch(0);
              return false;
            });
            /* Search end */
        });

        <?php /*
        function manualSearch(vPageNum)
        {
            var vCity = $('#vCity').val();
            var vPurpose = $('.menu-onmap .active a').html();
            var vType = $('#vType').val();
            var vLivingArea = $('#vLivingArea').val();
            var vView = $('.view-type.active').attr('ref');
            var vOrder = $('.selectpicker-small').val();
            
            var data = {
                address: vCity,
                order: vOrder,
                view: vView,
                page_num: vPageNum,
                option_2: vType, // Type of property
                option_3: vLivingArea, // Living area
                option_4: vPurpose // Purpose
            };
            
            $.post("{ajax_load_url}/"+vPageNum, data,function(data){
                $(".wrap-content .container").slideUp(1000,function(){
                    $('.wrap-content .container').html(data.print);
                    reloadElements();
                    $(".wrap-content .container").slideDown(1000);
                });
            }, "json");
            return false;
        }   */ ?>
    </script>
    
</head>

<body>
<div class="container">
    <div class="masthead">
    <ul class="nav pull-right top-small">
        <li>
            <i class="icon-phone"></i> <?php echo $psosyal['phone']; ?>
        </li>
        <li> <a href="mailto:sandi.winter@gmail.com"><i class="icon-envelope"></i> <?php echo $psosyal['site_eposta']; ?></a>
        </li>
    </ul>
    </div>
</div>
<div class="head-wrapper">
    <div class="container">
        <div class="row">
            <div class="masthead span12">
                <a href="<?php echo base_url('/'); ?>" class="logo">
                    <img alt="Logo" src="<?php echo base_url('assets/theme/images/logo.png'); ?>">
                </a>
                <div class="navbar">
                  <div class="">
                    <div class="container2">
                     <ul role="navigation" class="nav">
                        <li class="first"><a href="<?php echo site_url(); ?>"><img alt="<?php echo lang('home_homebtn') ?>" src="<?php echo base_url('assets/theme/blue/img/home-icon.png'); ?>"></a></li>
                                    <li class="dropdown">
                                        <a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo lang('home_categorybtn') ?> <b class="caret"></b></a>
                                        <ul class="dropdown-menu">
                                            <?php
                                            if (!empty($pcategory)) {
                                                foreach ($pcategory as $key => $item) {
                                                    echo "<li><a href='" . site_url() . "cat/$key'>$item</a></li>";
                                                }
                                            }
                                            ?>
                                        </ul>
                                    </li>                           
                                    <li class="dropdown">
                                        <a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo lang('home_typebtn') ?> <b class="caret"></b></a>
                                        <ul class="dropdown-menu">
                                            <?php
                                            if (!empty($ptype)) {
                                                foreach ($ptype as $key => $item) {
                                                    echo "<li><a href='" . site_url() . "type/$key'>$item</a></li>";
                                                }
                                            }
                                            ?>
                                        </ul>
                                    </li>
                                    <?php
                                    if (!empty($pdata)) {
                                        foreach ($pdata as $key => $item) {
                                            echo "<li><a class='first' href='" . site_url() . "pages/$key'>$item</a></li>";
                                        }
                                    }
                                    ?>

                    </ul>
                     <ul class="nav pull-right">
                                    <li class="first"><a href="<?php echo site_url() . "blog" ?>"><?php echo lang('home_blogbtn') ?></a></li>
                                    <?php if (!$this->session->userdata('user_id')) { ?>
                                        <li class="first"><a href="<?php echo site_url() . "register" ?>"><?php echo lang('home_signupbtn') ?></a></li>         
                                        <li class="dropdown">
                                            <a data-toggle="dropdown" href="#" class="dropdown-toggle"><?php echo lang('home_signinbtn') ?> <strong class="caret"></strong></a>
                                        <div class="dropdown-menu">
                                            <?php
                                            echo form_open("auth/login");
                                            $identity = array('name' => 'identity', 'id' => 'identity', 'type' => 'text', 'placeholder' => lang('home_username'), 'size' => '30');
                                            $password = array('name' => 'password', 'id' => 'password', 'type' => 'password', 'placeholder' => lang('home_password'), 'size' => '30');
                                            echo form_input($identity);
                                            echo form_input($password);
                                            ?>
                                            <label class="forgotP"><a href="<?php echo site_url() . "forgot_password" ?>"><?php echo lang('home_forgotpassword') ?></a></label>
                                            <label class="string optional"><?php echo form_checkbox('remember', '1', FALSE, 'id="remember"'); ?><?php echo lang('home_rememberme') ?></label> 
                                            <?php echo form_submit('submit', lang('home_loginbtn'), 'class="btn btn-block btn-info"'); ?>
                                            <?php echo form_close(); ?>                       
                                        </div>
                                    <?php } else { ?>
                                        <li class="dropdown">
                                            <a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo lang('home_userpanels') ?><b class="caret"></b></a>
                                            <ul class="dropdown-menu">
                                                <li class="current-user">
                                                    <a data-nav="edit_profile" class="account-summary account-summary-small" href="<?php echo site_url() . "profile" ?>">
                                                        <img src="<?php echo "http://www.gravatar.com/avatar/" . md5(strtolower(trim($this->session->userdata('email')))) . "&s=32" ?>" class="avatar size32">
                                                        <div class="userinfo"><b class="fullname"><?php echo $pusername[0]['first_name'] . ' ' . $pusername[0]['last_name'] ?></b>
                                                            <small class="metadata"><?php echo lang('home_profiledit') ?></small>
                                                        </div>
                                                    </a>
                                                </li>
                                                <li class="divider"></li>
                                                <?php if ($this->session->userdata('level') >= 2) { ?>
                                                    <?php if ($this->session->userdata('level') >= 3) { ?>
                                                        <li><a href="<?php echo site_url() . 'admin/estateAdd' ?>"><?php echo lang('home_addestate') ?></a></li>
                                                    <?php } ?>
                                                    <li><a href="<?php echo site_url() . 'admin/blogAdd' ?>"><?php echo lang('home_addblog') ?></a></li>
                                                    <?php if ($this->session->userdata('level') >= 4) { ?>
                                                        <li><a href="<?php echo site_url() . 'admin/pageAdd' ?>"><?php echo lang('home_addpage') ?></a></li>
                                                    <?php } ?>
                                                    <li class="divider"></li>
                                                    <li><a href="<?php echo site_url() . 'admin' ?>"><b><?php echo lang('home_admindashboard') ?></b></a></li>
                                                <?php } ?>
                                                <li><a href="<?php echo site_url() . 'change_password' ?>"><?php echo lang('home_changepassword') ?></a></li>
                                                <li class="divider"></li>
                                                <li><a href="<?php echo site_url() . 'logout' ?>"><?php echo lang('home_logout') ?></a></li>
                                            </ul>
                                        </li>
                                    <?php } ?>
                                    </li>
                                </ul>
                    </div>
                  </div>
                </div><!-- /.navbar -->
            </div>  
        </div> 
        <div class="simple-languages" style="display:none;">
            <ul><li class="active">&nbsp;</li>
                <li>&nbsp;</li>
            </ul>
        </div>
    </div>
</div>